home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_02_04
/
2n04039a
< prev
next >
Wrap
Text File
|
1991-02-16
|
247b
|
19 lines
'
' Casting 9's
'
DEFINT K
DEFLNG L
FUNCTION CAST (L)
L1 = L
WHILE L1 > 9
K = K + L1 MOD 10
IF K > 9 THEN K = K - 9
L1 = L1 \ 10
WEND
K = K + L1
IF K > 9 THEN K = K - 9
CAST = K
END FUNCTION